// pages/my/personal-details/index.js
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    gridList:[
      {id:'0',img:'https://upload-bbs.miyoushe.com/upload/2023/10/10/378227959/6afda0ab250aef2ec69ec4dafc098426_4095291018311454964.jpg?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Consequatur in ipsa ab sapiente enim. Accusantium aut est voluptas sequi.'},
      {id:'1',img:'https://act-webstatic.mihoyo.com/upload/contentweb/hk4e/721a74c43614d7aeb25b046cabfb57be_2012964858524199390.jpg',text:'Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi '},
      {id:'2',img:'https://upload-bbs.miyoushe.com/upload/2023/10/08/81288668/445a3288adcd60f64c3f24869c7ddf01_1638262299820375823.jpg?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Consequatur in ipsa ab sapiente enim. Accusantium aut est voluptas sequi.'},
      {id:'3',img:'https://upload-bbs.miyoushe.com/upload/2023/10/12/378227959/a50458e1431ff75a16f22cd7918b5571_3505223145960566629.png?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi '},
      {id:'4',img:'https://upload-bbs.miyoushe.com/upload/2023/10/13/378227959/e7208a373cdf603ceb12faae75e02259_8572277283399967481.png?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Consequatur in ipsa ab sapiente enim. Accusantium aut est voluptas sequi. Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi cupiditate. Fuga aspernatur incidunt aliquid.'},
      {id:'5',img:'https://upload-bbs.miyoushe.com/upload/2023/10/09/225756338/5e1959e0e666e3da016910285f723204_5439961189731738351.jpg?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi '},
    ]
  },
  scrolltolower(e){
    const gridArr = [
      {id:'0',img:'https://upload-bbs.miyoushe.com/upload/2023/10/10/378227959/6afda0ab250aef2ec69ec4dafc098426_4095291018311454964.jpg?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Consequatur in ipsa ab sapiente enim. Accusantium aut est voluptas sequi.'},
      {id:'1',img:'https://act-webstatic.mihoyo.com/upload/contentweb/hk4e/721a74c43614d7aeb25b046cabfb57be_2012964858524199390.jpg',text:'Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi '},
      {id:'2',img:'https://upload-bbs.miyoushe.com/upload/2023/10/08/81288668/445a3288adcd60f64c3f24869c7ddf01_1638262299820375823.jpg?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Consequatur in ipsa ab sapiente enim. Accusantium aut est voluptas sequi.'},
      {id:'3',img:'https://upload-bbs.miyoushe.com/upload/2023/10/12/378227959/a50458e1431ff75a16f22cd7918b5571_3505223145960566629.png?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi '},
      {id:'4',img:'https://upload-bbs.miyoushe.com/upload/2023/10/13/378227959/e7208a373cdf603ceb12faae75e02259_8572277283399967481.png?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Consequatur in ipsa ab sapiente enim. Accusantium aut est voluptas sequi. Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi cupiditate. Fuga aspernatur incidunt aliquid.'},
      {id:'5',img:'https://upload-bbs.miyoushe.com/upload/2023/10/09/225756338/5e1959e0e666e3da016910285f723204_5439961189731738351.jpg?x-oss-process=image/quality,Q_80/resize,m_lfit,s_500',text:'Quibusdam neque aperiam dolor. Excepturi sunt a minus fuga autem excepturi '},
    ]
    wx.showLoading({
      title: '加载中',
    })
    const arr = []
    for (let index = 0; index < gridArr.length; index++) {
      const stamp = new Date().getTime()
      const randomNum = (Math.floor(Math.random()*10)+6)%6
      arr.push(gridArr[randomNum])
      arr[index].id = index+(Math.random()*10>5?stamp:e.timeStamp)
    }
    this.setData({
      gridList:[...this.data.gridList,...arr]
    })
    wx.hideLoading()
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})